package com.appkubes.fintech.admin.application.risk.data.xingpan.controller;

import com.appkubes.fintech.admin.application.risk.data.xingpan.service.XingPanRiskService;
import com.appkubes.fintech.common.response.Response;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @Author: leeming
 * @Date: 2020-02-06 19:53
 * @Description:
 */
@Slf4j
@RestController
@Api(tags = "星盘运营商数据")
@RequestMapping("/risk/xingpan")
public class XingPanController {
    @Resource
    private XingPanRiskService xingPangRiskService;

    @ApiOperation("爬取数据")
    @GetMapping("/crawlerData")
    public Response crawlerData(String userKey,String pass) {
        return xingPangRiskService.crawlerData(userKey,pass);
    }

    @ApiOperation("填写验证码")
    @GetMapping("/appendData")
    public Response appendData(String userKey,String name,String code,String crawlerId ,String crawlerToken) {
        return xingPangRiskService.appendData(userKey,name,code,crawlerId,crawlerToken);
    }

    @ApiOperation("获取运营商通话记录")
    @GetMapping("/getOperator")
    public Response getOperator(String userKey) {
        return xingPangRiskService.getOperator(userKey);
    }

    @ApiOperation("获取运营商通话记录")
    @GetMapping("/getOperatorReport")
    public Response getOperatorReport(String userKey) {
        return xingPangRiskService.getOperatorReport(userKey);
    }
}
